import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path'

// https://vitejs.dev/config/

/*
*   resolve:重定向@路径
*   base:配置打包后基准路径
*
*/
export default defineConfig({
  plugins: [vue()],
  resolve: {
    alias: {
      '@': resolve('./src')
    }
  },
  css:{
    preprocessorOptions:{
        scss:{
            additionalData: "@import '@/assets/css/_static.scss';",
        }
    }
  },
  base: './',
  build: {
    outDir: 'web',
    assetsDir: 'static'
  },
  server: {
    // port: 8080,
    open: true,
    cors: true
  }
})
